package top.zhangjianyong.blog.portal.controller;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.zhangjianyong.blog.params.user.UserGetParam;
import top.zhangjianyong.blog.response.ApiResponse;
import top.zhangjianyong.blog.service.UserService;

/**
 * 用户信息
 *
 * @author zhangjianyong
 * @since 2024/8/17 下午2:57
 */
@RequestMapping("/portal/user")
@RestController("portalUserController")
public class UserController {
  private final UserService userService;

  public UserController(UserService userService) {
    this.userService = userService;
  }

  @PostMapping("/get")
  public ApiResponse get(UserGetParam param) {
    return userService.getUserInfo(param);
  }
}
